class Request:
    def __init__(self, headers: dict, method, path, scheme):
        self.headers = headers
        self.method = method
        self.path = path
        self.scheme = scheme
        self.body = ""
        self.host = headers.get("Host")
        self.connection = headers.get("Connection")
        self.user_agent = headers.get("User-Agent")
        self.cookies = headers.get("Cookies")
        self.referer = headers.get("Referer", "")
        self.accept = headers.get("Accept")
        self.cache_control = headers.get("Cache-Control")
        self.accept_encoding = headers.get("Accept-Encoding")
        self.accept_language = headers.get("Accept-Language")
        self.upgrade_insecure_requests = headers.get("Upgrade-Insecure-Requests")

    def set_body(self, body):
        self.body = body

    def __str__(self):
        return "<{} {} {} at {}>". \
            format(__class__.__name__, self.method, self.path, self.host)

    def __bytes__(self):
        return str(self).encode()
